#include <stdio.h>
#include <math.h>

#define TRACE(x...) 
#define PRINT(x...) TRACE(printf(x))

bool lights[3000];

int l, d, v, g, r;
double toLights;
double toEnd;
int cLig, fLig;

int main() {
	scanf("%d %d %d %d %d", &l, &d, &v, &g, &r);

	toLights = (double)d/(double)v;
	toEnd = (double)l/(double)v;

	for (int i=0; i<3000; i+=(g+r)) {
		for (int j=i; j<(g+i); j++)
			lights[j]=true;
		for (int j=i+g; j<(g+r+i); j++) 
			lights[j]=false;
	}

	TRACE(
		for (int i=0; i<100; i++)
			printf("%c ", lights[i]? 'g' : 'r');
		printf("\n");
	)

	fLig = (int) floor(toLights);

	if (!lights[fLig]) {
		cLig=fLig+1;
		toEnd+= cLig-toLights;

		for (int j=cLig; j<(cLig+1010); j++) {
			if (lights[j]) break;
			toEnd+=1.0;
		}
	} 

	printf("%.8lf\n", toEnd);

	return 0;
}
